package com.gugee.ins.data.task.monitor;

import com.gugee.ins.data.task.monitor.service.InsKafKaLagMonitorSvc;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Description: 定时监控任务
 * @author Huangxin
 */
@Component
@Slf4j
public class InsMonitorTask {

    /**
     * insKafKaMonitorSvc
     */
    @Autowired
    InsKafKaLagMonitorSvc insKafKaLagMonitorSvc;

    /**
     * kafka队列积压任务
     * @return 调度结果
     */
    @XxlJob("KafKaLagMonitor")
    public ReturnT<String> kafKaLagMonitor(String param) {
        return insKafKaLagMonitorSvc.xxlJobStart("kafka队列积压任务 ",param);
    }
}
